import { defineComponent, ref } from "vue"
import loveLess from './index.module.less'
import Card from '@/component/card.vue'

export default defineComponent({
  setup (props) {
    const card = ref([
      { img: '/img/g1.png', brand: 'EleganceWood', name: '米兰时尚椅', price: '￥298.00' },
      { img: '/img/g2.png', brand: 'NobleCraft', name: '威尼斯晨光沙发', price: '￥699.00' },
      { img: '/img/g3.png', brand: 'PrestigeFurniture', name: '雅致流苏边桌', price: '￥369.00' },
      { img: '/img/g4.png', brand: 'regalTimber', name: '极简立方体边桌', price: '￥239.00' },
      { img: '/img/g5.png', brand: 'VirtuosoVeneer', name: '塞纳河畔边桌', price: '￥229.00' },
      { img: '/img/g6.png', brand: 'EleganceWood', name: '都市绿洲沙发', price: '￥869.00' },
      { img: '/img/g7.png', brand: 'NobleCraft', name: '巴洛克华冠', price: '￥599.00' },
      { img: '/img/g8.png', brand: 'SovereignSpruce', name: '晨曦曙光椅', price: '￥199.00' },
      { img: '/img/g1.png', brand: 'EleganceWood', name: '米兰时尚椅', price: '￥298.00' },
      { img: '/img/g2.png', brand: 'NobleCraft', name: '威尼斯晨光沙发', price: '￥699.00' },
      { img: '/img/g3.png', brand: 'PrestigeFurniture', name: '雅致流苏边桌', price: '￥369.00' },
      { img: '/img/g4.png', brand: 'regalTimber', name: '极简立方体边桌', price: '￥239.00' },
      { img: '/img/g5.png', brand: 'VirtuosoVeneer', name: '塞纳河畔边桌', price: '￥229.00' },
      { img: '/img/g6.png', brand: 'EleganceWood', name: '都市绿洲沙发', price: '￥869.00' },
      { img: '/img/g7.png', brand: 'NobleCraft', name: '巴洛克华冠', price: '￥599.00' },
    ])

    return () => (
      <div class={ loveLess.profile_love }>
        {
          card.value.map((item, index) => (
            <Card item={ item } key={ index } />
          ))
        }
      </div>
    )
  }
})